
/*
* @Author: nccloud
* @PageInfo: 常量池
*/
// 页面模板编码
const PAGECODE = {
        listPagecode: '20060794_list',
        cardPagecode: '20060794_card'
};

/**
* @description: 多语
* @param moduleId: 多语资源名
* @param domainName: 工程名
*/
const MULTILANG = {
        langfileId: ['4001pubmessage'],
        domainName: 'arap'
};

const BILLTYPECODE= 'TXDJ';

// 区域编码
const AREA = {
        searchId: 'search', // 列表查询区
        listTableId: 'list_table', // 列表表头区
        cardFormId: 'card_head', // 卡片表头区


        cardBody_1: 'cardBody_1',
        cardBody_2: 'cardBody_2',

        /** 按钮区域 */
        listHead: 'listBtn_head', // 列表表头按钮区
        listInner: 'listBtn_inner', // 列表表体操作区
        cardHead: 'card_head', // 卡片表头按钮区

/**默认生成全部肩部，可根据需求设置*/
        cardBody_1_shoulder: 'cardBody_1_shoulder',
        cardBody_2_shoulder: 'cardBody_2_shoulder',
/**默认生成全部表体操作区，可根据需求设置*/
        cardBody_1_inner: 'cardBody_1_inner',
        cardBody_2_inner: 'cardBody_2_inner'
};

// 卡片表格区域ID
const CARDTABLEAREAIDS = [
    
        AREA.cardBody_1,
        AREA.cardBody_2
];
const CARDTABLEAREAIDS2 = [
      
        AREA.cardBody_2
];


// 卡片表格区域名称
const CARDTABLEAREANAMES = [
        '4001PUBMESSAGE-0000007',
        '4001PUBMESSAGE-0000008'
        // '4001PUBMESSAGE-0000009',
        // '4001PUBMESSAGE-0000010'
]; /* 国际化处理： 折扣梯度,单品折扣,组合折扣,适用组织*/

// 按钮ID
const BUTTONID = {
        Add: 'Add', // 新增
        Delete: 'Delete', // 删除
        Refresh: 'Refresh', // 刷新
        Edit: 'Edit', // 修改
        Copy: 'Copy', // 复制
        Save: 'Save', // 保存
        Cancel: 'Cancel', // 取消
        Commit: 'Commit', // 提交
        UnCommit: 'UnCommit', //收回
        Verfy:'Verfy' ,//关闭
        ftDetail:'ftDetailBtn' ,//分摊明细
        batchBlueBtn:'batchBlueBtn',//批量制单
        Voucher:'Voucher',//制单
        RedHandle:'RedHandle',//红冲
        cardBody_1_AddLine: 'AddLineGra', // 增行
                cardBody_2_AddLine: 'AddLineSin', // 增行
        
        cardBody_1_DeleteLine: 'DeleteLineGra', // 删行
                cardBody_2_DeleteLine: 'DeleteLineSin', // 删行
        
        cardBody_1_CopyLine: 'CopyLineGra', // 复制行
                cardBody_2_CopyLine: 'CopyLineSin', // 复制行
        
        cardBody_1_PasteLineToTail: 'PasteLineToTailGra', // 粘贴至末行
                cardBody_2_PasteLineToTail: 'PasteLineToTailSin', // 粘贴至末行
        
        cardBody_1_CancelB: 'CancelBGra', // 取消(粘贴)
                cardBody_2_CancelB: 'CancelBSin', // 取消(粘贴)
        
        cardBody_1_PasteLine: 'PasteLineGra', // 粘贴至此
                cardBody_2_PasteLine: 'PasteLineSin', // 粘贴至此
        
        cardBody_1_InsertLine: 'InsertLineGra', // 插行
                cardBody_2_InsertLine: 'InsertLineSin', // 插行
        
        Back: 'Back' // 返回
};

//请求基础路径
export const base_path = '/nccloud/amortizationvo/common';

// URL
const URL = {
        list: '/list',
        card: '/card',
        query: `/nccloud/amortizationvo/common/query.do`,
        queryCard: `/nccloud/amortizationvo/common/queryCard.do`,
        delete: `/nccloud/amortizationvo/common/delete.do`,
        copy: `/nccloud/amortizationvo/common/copy.do`,
        print: `/nccloud/amortizationvo/common/print.do`,
        save: `/nccloud/amortizationvo/common/save.do`,
        commit: `/nccloud/amortizationvo/common/commit.do`,
        unCommit: `/nccloud/amortizationvo/common/unCommit.do`,
        queryAcc: `/nccloud/amortizationvo/common/queryAcc.do`,
        verfy: `/nccloud/amortizationvo/common/verfy.do`,
        Voucher: `/nccloud/amortizationvo/common/createVoucher.do`,
        bodySelected: `/nccloud/amortizationvo/common/bodySelected.do`,
        QueryHeadacc: `/nccloud/amortizationvo/common/QueryHeadacc.do`,


        headBeforeEdit: `/nccloud/amortizationvo/common/headBeforeEdit.do`,
        headAfterEdit: `/nccloud/amortizationvo/common/headAfterEdit.do`,
        bodyBeforeEdit: `/nccloud/amortizationvo/common/bodyBeforeEdit.do`,
        bodyAfterEdit: `/nccloud/amortizationvo/common/bodyAfterEdit.do`
};

// 字段
const FIELDS = {
        /** 表头字段 */
        pk_head_fields: 'pk_amortization', // 表头字段

        pk_org: 'pk_org', // 所属组织
        pk_group: 'pk_group', // 所属集团
        ts: 'ts', // 时间戳
        pk_body_b1: 'pk_amortization_b',
        pk_body_b2: 'pk_amortization_c'

};

// 页面状态
const UISTATUS = {
        add: 'add', // 新增态
        copy: 'copy', // 复制态
        browse: 'browse', // 浏览态
        edit: 'edit' // 编辑态
};

// 单页缓存
const DATASOURCECACHE = {
        dataSourceListCacheKey: 'arap.amortization.nccloud.data_source_list' // 列表缓存ID
};

// 自定义缓存
const DEFCACHEKEY = {
        queryCacheKey: 'queryCacheKey' // 查询条件缓存
};

// 复制行操作
const COPYPASTEBTNS = {
        [AREA.cardBody_1]: {
        initBtns: [BUTTONID.cardBody_1_AddLine, BUTTONID.cardBody_1_DeleteLine, BUTTONID.cardBody_1_CopyLine],
        pasteBtns: [BUTTONID.cardBody_1_PasteLineToTail, BUTTONID.cardBody_1_CancelB]
        },

        [AREA.cardBody_2]: {
        initBtns: [BUTTONID.cardBody_2_AddLine, BUTTONID.cardBody_2_DeleteLine, BUTTONID.cardBody_2_CopyLine],
        pasteBtns: [BUTTONID.cardBody_2_PasteLineToTail, BUTTONID.cardBody_2_CancelB]
        }

};

// 删除行、复制行显隐性
const DELETELINEBTNS = {
        [AREA.cardBody_1]: [BUTTONID.cardBody_1_DeleteLine, BUTTONID.cardBody_1_CopyLine],
        [AREA.cardBody_2]: [BUTTONID.cardBody_2_DeleteLine, BUTTONID.cardBody_2_CopyLine]
};

// 粘贴时需清空的字段
const PASTECLEARFIELDS = {
        [AREA.cardBody_1]: [FIELDS.pk_body_b1, FIELDS.ts],
        [AREA.cardBody_2]: [FIELDS.pk_body_b2, FIELDS.ts]
};

export {
        PAGECODE,
        AREA,
        CARDTABLEAREAIDS,
        CARDTABLEAREAIDS2,
        CARDTABLEAREANAMES,
        BUTTONID,
        MULTILANG,
        URL,
        FIELDS,
        UISTATUS,
        DATASOURCECACHE,
        DEFCACHEKEY,
        COPYPASTEBTNS,
        DELETELINEBTNS,
        
        PASTECLEARFIELDS
};
